<%-- 
    Document   : mainEstandar
    Created on : 21-nov-2012, 8:24:23
    Author     : pc
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="fm" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="<c:url value="/recursos/css/start/jquery-ui-1.9.0.custom.css" />">
        <link type="text/css" rel="stylesheet" href="<c:url value="/recursos/css/lp1.css" />">
        <link type="text/css" rel="stylesheet" href="<c:url value="/recursos/css/style.css" />">
        <script type="text/javascript" src="<c:url value="/recursos/js/jquery-1.8.2.js"/>"></script>
        <script type="text/javascript" src="<c:url value="/recursos/js/jquery-ui-1.9.0.custom.js"/>"></script>
        <script type="text/javascript" src="<c:url value="/recursos/ajax/funcionesUtils.js"/>"></script>
        <title>JSP Page</title>
        <script type="text/javascript">
            function mostrarFormulario(){
                $("#cuadroReporteR").accordion();
                $.ajax({
                    type:"GET",
                    uri:"formEstandar.dmp",
                    data:"",
                    success:function(rdata){
                         ${"#cuadroReporte2"}.html(rdata);
                                 $("#cuadroReporte2").show(); 
                    }
                });
            }
        </script>
    </head>
    <body onload="mainEstandarEjecuta()">
        <div id="cuadroReporte2">
            
        </div>
        <c:if test="${!empty listEstandar}">
            <div id="cuadroReporte" align="center" style="width: 80%">
                <h3>Administrar Estandar</h3>
                <div>
                    
                    <div id="divFormBuscar">
                        Estandar
                        <input type="text" name="estandar" value=""/>
                        <input type="submit" id="btnBuscar" value="Buscar"/>
                        <input type="button" id="btnNuevo" style="display: none" onclick="mostrarFormulario()" value="Nuevo"/>
                        
                </div>
                 
                    <div id="divMostrarMsg" style="display: none">
                        
                    </div>
                    <table border="1">
                        <thead>
                            <tr>
                                <th colspan="7">Reporte de Estandares</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Id Estandar</td>
                                <td>Nombre</td>
                                <td>Descripcion</td>
                                <td>Estado</td>
                                <td>Fecha</td>
                                <td>Nro de Estandares</td>
                                <td>Opciones</td>
                            </tr>
                            <c:forEach items="${listEstandar}" var="e">
                                <tr>
                                    <td><c:out value="${e.idEstandar}"/></td>
                                    <td><c:out value="${e.nombre}"/></td>
                                    <td><c:out value="${e.descripcion}"/></td>
                                    <td><c:out value="${e.estado}"/></td>
                                    <td><c:out value="${e.fecha}"/></td>
                                    <td><c:out value="${e.nroEstandar}"/></td>
                                    <td>
                                        <a href="eliminarEst.dmp?idEstandarE=${e.idEstandar}">Eliminar</a>
                                        <a href="editarEstandar.dmp?idEstandarE=${e.idEstandar}">Editar</a>
                                    </td>
                                </tr>
                            </c:forEach>
                        </tbody>
                    </table> 
                    
            </div>
        </c:if>
        
    </body>
</html>
